import axios from 'axios';
import { loginreq, req ,req2} from './axiosFun';


/**
 * 登录
 **/
// 登录接口
export const login = (params) => { return loginreq("post", "/api/login/login", params) };


// 左侧导航栏——获取权限信息
export const jurisdictionInfo = (params) => { return req("post", "/api/StaffJurisdiction/getJurCode?staff_id=" + params) };


/**
 * 菜品管理
 **/
// 菜品管理-获取菜品列表Dishes/list
export const dishestList = (params) => { return req("post", "/api/Dishes/list", params) };
// 菜品管理-添加菜品
export const dishestAdd = (params) => { return req("post", "/api/Dishes/add", params) };
// 菜品管理-编辑菜品
export const dishestUpdate = (params) => { return req("post", "/api/Dishes/update", params) };
// 菜品管理-删除菜品
export const dishestDelete = (params) => { return req("post","/api/Dishes/delete?dishes_id=" + params)};
// 菜品管理-获取分类列表Category/list
export const categoryList = (params) => { return req("post", "/api/Category/list", params) };
// 菜品管理-添加分类
export const categoryAdd = (params) => { return req("post", "/api/Category/add", params) };
// 菜品管理-编辑分类
export const categoryUpdate = (params) => { return req("post", "/api/Category/update", params) };
// 菜品管理-删除分类
export const categoryDelete = (params) => { return req("post","/api/Category/delete?category_id=" + params)};

/**
 * 订单管理
 **/
   // 系统管理-获取订单列表Indent/list
   export const IndentList = (params) => { return req("post", "/api/Indent/list", params) };
   // 系统管理-添加订单
   export const IndentAdd = (params) => { return req("post", "/api/Indent/add", params) };
   // 系统管理-编辑订单
   export const IndentUpdate = (params) => { return req("post", "/api/Indent/update", params) };
   // 系统管理-删除订单
   export const IndentDelete = (params) => { return req("post","/api/Indent/delete?indent_id=" + params)};
   // 系统管理-获取所有评论列表Comment/list
   export const CommentList = (params) => { return req("post", "/api/Comment/list", params) };
   // 系统管理-获取退款订单列表Chargeback/list
   export const ChargebackList = (params) => { return req("post", "/api/Chargeback/list", params) };
   // 系统管理-添加退款订单
   export const ChargebackAdd = (params) => { return req("post", "/api/Chargeback/add", params) };
   // 系统管理-编辑退款订单
   export const ChargebackUpdate = (params) => { return req("post", "/api/Chargeback/updtchargeback",params) };
   // 系统管理-删除退款订单
   export const ChargebackDelete = (params) => { return req("post","/api/Chargeback/delete?chargeback_id=" + params)};

 /**
  * 活动管理
  **/
  // 活动管理-获取满减列表Coupon/list
  export const CouponList = (params) => { return req("post", "/api/Coupon/list", params) };
  // 系统管理-添加满减
  export const CouponAdd = (params) => { return req("post", "/api/Coupon/add", params) };
  // 活动管理-编辑满减
  export const CouponUpdate = (params) => { return req("post", "/api/Coupon/update",params) };
  // 活动管理-删除满减
  export const CouponDelete = (params) => { return req("post","/api/Coupon/delete?coupon_id=" + params)};
  // 活动管理-获取用户满减列表UserCoupon/list
  export const UserCouponList = (params) => { return req("post", "/api/UserCoupon/list", params) };

 /**
  * 用户管理
  **/
  // 用户管理-获取用户列表User/index
  export const userList = (params) => { return req("post", "/api/User/index", params) };

  /**
   * 系统管理
   **/
   // 系统管理-获取员工列表Staff/list
   export const StaffList = (params) => { return req("post", "/api/Staff/list", params) };
   // 系统管理-添加员工
   export const StaffAdd = (params) => { return req("post", "/api/Staff/add", params) };
   // 系统管理-编辑员工
   export const StaffUpdate = (params) => { return req("post", "/api/Staff/update", params) };
   // 系统管理-删除员工
   export const StaffDelete = (params) => { return req("post","/api/Staff/delete?staff_id=" + params)};
   // 系统管理-获取员工角色列表StaffRole/list
   export const StaffRoleList = (params) => { return req("post", "/api/StaffRole/list", params) };
   // 系统管理-添加角色
   export const StaffRoleAdd = (params) => { return req("post", "/api/StaffRole/add", params) };
   // 系统管理-编辑角色
   export const StaffRoleUpdate = (params) => { return req("post", "/api/StaffRole/update", params) };
   // 系统管理-删除角色
   export const StaffRoleDelete = (params) => { return req("post","/api/StaffRole/delete?role_id=" + params)};
   // 系统管理-获取左侧菜单列表LeftMenu/list
   export const LeftMenuList = (params) => { return req("post", "/api/LeftMenu/list", params) };
   // 系统管理-添加左侧菜单
   export const LeftMenuAdd = (params) => { return req("post", "/api/LeftMenu/add", params) };
   // 系统管理-编辑左侧菜单
   export const LeftMenuUpdate = (params) => { return req("post", "/api/LeftMenu/update", params) };
   // 系统管理-删除左侧菜单
   export const LeftMenuDelete = (params) => { return req("post","/api/LeftMenu/delete?left_menu_id=" + params)};
   // 系统管理-获取员工权限列表StaffJurisdiction/list
   export const StaffJurisdictionList = (params) => { return req("post", "/api/StaffJurisdiction/list", params) };
   // 系统管理-添加权限
   export const StaffJurisdictionAdd = (params) => { return req("post", "/api/StaffJurisdiction/add", params) };
   // 系统管理-编辑权限
   export const StaffJurisdictionUpdate = (params) => { return req("post", "/api/StaffJurisdiction/update", params) };
   // 系统管理-删除权限
   export const StaffJurisdictionDelete = (params) => { return req("post","/api/StaffJurisdiction/delete?jurisdiction_id=" + params)};
